from django.urls import path
from apps.meiduo_admin.views.home import UserDailyActiveCountView, UserMonthCountView
from apps.meiduo_admin.views.image import ImageModelViewSet, SKUListAPIView
from apps.meiduo_admin.views.sku import SKUModelViewSet, ThreeCategoryListAPIView, SPUSimpleListAPIView
from rest_framework_jwt.views import obtain_jwt_token
#
# urlpatterns = [
#     path('authorizations/', obtain_jwt_token),
# ]
from apps.meiduo_admin.views.login import admin_jwt_token
from apps.meiduo_admin.views.user import UserListView

urlpatterns = [
    path('authorizations/', admin_jwt_token),
    path('statistical/day_active/', UserDailyActiveCountView.as_view()),
    path('statistical/month_increment/', UserMonthCountView.as_view()),
    path('users/', UserListView.as_view()),
    path('skus/simple/', SKUListAPIView.as_view()),
    path('skus/categories/', ThreeCategoryListAPIView.as_view()),
    path('goods/simple/', SPUSimpleListAPIView.as_view()),
]

from rest_framework.routers import DefaultRouter
router = DefaultRouter()
router.register('skus/images', ImageModelViewSet, basename='skus_images')
router.register('skus', SKUModelViewSet, basename='sku')
urlpatterns += router.urls
# urlpatterns += router.urls
